package com.zeyi.chat;

import com.zeyi.chat.controller.WindowMove;
import com.zeyi.chat.manager.StageManager;
import com.zeyi.chat.utils.FXMLUtil;
import com.zeyi.chat.views.CircleBorder;
import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.stage.Stage;
import javafx.stage.StageStyle;

/**
 * @author zeyi
 */
public class MainApplication extends Application {
    @Override
    public void start(Stage primaryStage) throws Exception {
        Scene scene = FXMLUtil.createScene("/Fxml/Login.fxml");
        primaryStage.setScene(scene);
        new CircleBorder(scene, 5, "#DCDFE6");
        new WindowMove(primaryStage, scene.getRoot());
        primaryStage.initStyle(StageStyle.TRANSPARENT);
        primaryStage.getIcons().add(new Image("/images/user.jpg"));
        primaryStage.show();
        StageManager.setPrimaryStage(primaryStage);
    }

    public static void main(String[] args) {
        launch(args);
    }
}
